package com.topka.buynewcar.android.pages;

import io.appium.java_client.android.AndroidDriver;

import java.util.List;

import org.openqa.selenium.WebElement;

import com.topka.buynewcar.base.BasePage;

public class AskPricePage extends BasePage {
	
	private WebElement chooseCar;
	private WebElement city;
	private WebElement askCity;
	private WebElement askPrice;
	private WebElement askPriceComplete;

	public AskPricePage(AndroidDriver wd) {
		super(wd);
	}
	
	public void clickChooseCar(){
		chooseCar = findViewById("fl_noCarLayout");
		chooseCar.click();
	}
	
	public List<WebElement> getCars(){
		return findViewsById("");
	}

	public void swipeToBottom(){
		int width=wd.manage().window().getSize().width;
        int height=wd.manage().window().getSize().height;
        wd.swipe(width/2,height*3/4, width/2,height/4, 1000);
	}
	
	public String getCity(){
		city = findViewById("tv_city");
		return city.getText();
	}
	
	public void clickCity(){
		city = findViewById("tv_city");
		city.click();
	}
	
	public String getAskCity(){
		askCity = findViewById("tv_askCity");
		return askCity.getText();
	}
	
	public void clickAskCity(){
		askCity = findViewById("tv_askCity");
		askCity.click();
	}
	
	public void clickAskPrice(){
		askPrice = findViewById("tv_askprice");
		askPrice.click();
	}
	
	public void clickAskComplete(){
		askPriceComplete = findViewById("tv_askpriceContinue");
		askPriceComplete.click();
	}

}
